package 事务练习.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import 事务练习.service.UserService;

/**
 * @author caihe
 * @date 2021/6/2 10:51
 */
@Controller
public class UserController {

    @Autowired
    private UserService userService;
    
    @GetMapping("/b")
    @ResponseBody
    public String b(){
        return "success";
    }

    @GetMapping("/a")
    @ResponseBody
    public String a() throws Exception {
        userService.a();
        return "okkkkkk";
    }

}
